

<table id="dataTable">
    <thead><h4>订单基本信息</h4><br/><br/>
    <tr>
        <th>订单ID</th>
        <th>商家<br/>名称</th>
        <th>订单<br/>金额</th>
        <th>付款<br/>金额</th>
        <th>实际购买人姓名</th>
        <th>实际购买人<br/>联系方式</th>
        <th>代购人姓名</th>
        <th>代购人联系方式</th>
        <th>当前<br/>状态</th>
    </tr>
    </thead>
    <tbody>
        <tr>
            <td><?php echo $r['order']['id'];?></td>
            <td><?php echo $r['shop']['company']?></td>
            <td><?php echo $r['order']['order_amount'];?>
            <td><?php echo $r['order']['payment_amount'];?></td>
            <td><?php echo $r['user_real_name'];?></td>
            <td><?php echo $r['user_phone'];?></td>
            <td><?php echo $r['buyer_name'];?></td>
            <td><?php echo $r['buyer_phone'];?></td>
            <td><?php foreach($r['orderState'] as $k=>$v){ ?><?php if($k==$r['current_state']) echo $v;?><?php } ?></td>
        </tr>
    </tbody>
</table><br/><br/>
<table id="dataTable">
    <thead><h4>其它信息</h4><br/><br/>
    <tr>
        <th>备注信息</th>
        <th>收货<br/>地址</th>
        <th>服务站名称</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td><?php echo $r['order']['remark'];?></td>
        <td><?php echo $r['userAddress'];?></td>
        <td><?php echo $r['service_info']['service_name'];?></td>
    </tr>
    </tbody>
</table><br/><br/>
<table id="dataTable">
    <thead><h4>商品基本信息</h4><br/><br/>
    <tr>
        <th>商品ID</th>
        <th>商品名称</th>
        <th>商品价格</th>
        <th>商品规格</th>
        <th>商品数</th>
    </tr>
    </thead>
    <tbody>
    <?php foreach($r['goods_in_order'] as $v){?>
        <tr>
            <td><?php echo $v['gopen_id'];?></td>
            <td><?php echo $v['name'];?></td>
            <td>￥<?php echo $v['base_price'];?></td>
            <td><?php echo $v['attr_name']?></td>
            <th><?php echo $v['number'];?></th>
        </tr>
    <?php } ?>
    </tbody>
</table><br/><br/>
<?php if($r['order']['service_id']!=0){?>
<table id="dataTable">
    <thead><h4>交易流程</h4><br/><br/>
    <tr>
        <th>下单时间</th>
        <th>付款时间</th>
        <th>发货时间</th>
        <th>到达服务站时间</th>
        <th>用户签收时间</th>
        <th>用户确认时间</th>
        <?php if(!empty($r['order']['express_name'])&&!empty($r['order']['express_num'])){?>
            <th>操作</th>
        <?php }?>
    </tr>
    </thead>
    <tbody>
        <tr>
            <td><?php echo $r['order']['create_time'];?></td>
            <td><?php echo $r['order']['payment_time'];?></td>
            <td><?php echo $r['order']['shipping_time'];?></td>
            <td><?php echo $r['order']['service_time'];?></td>
            <td><?php echo $r['order']['delivery_time'];?></td>
            <td><?php echo $r['order']['deal_time'];?></td>
            <?php if(!empty($r['order']['express_name'])&&!empty($r['order']['express_num'])){?>
                <td><a href="http://www.kuaidi100.com/chaxun?com=<?php echo $r['order']['express_name'];?>&nu=<?php echo $r['order']['express_num']?>" target="_Blank">查看物流</a></td>
            <?php }?>
        </tr>
    </tbody>
</table>
<?php }else{?>
    <table id="dataTable">
        <thead><h4>交易流程</h4><br/><br/>
        <tr>
            <th>下单时间</th>
            <th>付款时间</th>
            <th>发货时间</th>
            <th>用户确认时间</th>
            <?php if(!empty($r['order']['express_name'])&&!empty($r['order']['express_num'])){?>
                <th>操作</th>
            <?php }?>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td><?php echo $r['order']['create_time'];?></td>
            <td><?php echo $r['order']['payment_time'];?></td>
            <td><?php echo $r['order']['shipping_time'];?></td>
            <td><?php echo $r['order']['deal_time'];?></td>
            <?php if(!empty($r['order']['express_name'])&&!empty($r['order']['express_num'])){?>
                <td><a href="http://www.kuaidi100.com/chaxun?com=<?php echo $r['order']['express_name'];?>&nu=<?php echo $r['order']['express_num']?>" target="_Blank">查看物流</a></td>
            <?php }?>
        </tr>
        </tbody>
    </table>
<?php }?>